<?php 


header('content-type:text/html;charset=utf-8');

$url = "http://127.0.0.1/P201704/bbs/api.php/api/user/userlist?appid=56546&key=fte&limit=10";

// $data = file_get_contents($url);

// var_dump(json_decode($data,true));

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);

$output = curl_exec($ch);

// var_dump(json_decode($output,true));



$url = "http://127.0.0.1/P201704/bbs/api.php/api/user/add";

$arr = array(
	'info'=>"这个了吗",
	'id' =>'809',
	'name'=>"学并思"
	);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $arr);

$output = curl_exec($ch);

var_dump(json_decode($output,true));








 ?>